﻿@model IEnumerable<HopNguyenModel.TypeImage>
@{
    ViewBag.Title = "Loại hình ảnh";
    Layout = "~/Views/Shared/_BackendLayout.cshtml";
}
<div class="page-header position-relative">
    <h1>Chuyên mục tin
    </h1>
</div>
<!--/.page-header-->
<div class="row-fluid">
    <div class="choose-type">
        <div class="span2">
            <a href="/Cpanel/CreateTypeImage" class="btn btn-primary">Tạo mới</a>
        </div>
        <div class="span4">
            <strong>Lọc nhóm cha</strong> @Html.DropDownList("Parent", null, "[No filter]", new { onchange = "parentchange(this.value)" })
        </div>
    </div>
</div>
<div class="row-fluid">
    <table id="sample-table-2" class="table table-striped table-bordered table-hover">
        <thead>
            <tr>
                <th>Id</th>
                <th style="text-align: left">Tên</th>
                <th>Nhóm cha</th>
                <th>Action</th>
            </tr>
        </thead>
        <tbody>
            @foreach (var item in Model)
            {
                <tr>
                    <td>@item.Id</td>
                    <td style="text-align: left"><a href="/Cpanel/EditTypeImage/@item.Id">@item.Name</a></td>
                    <td>@(item.TypeImage2 != null ? item.TypeImage2.Name : "")</td>
                    <td>
                        <a href="/Cpanel/EditTypeImage/@item.Id" title="Sửa">Sửa</a> | 
                            <a href="/Cpanel/DeleteTypeImage/@item.Id" onclick="javascript:return confirm('Are you sure?');" title="Xóa">Xóa</a>
                    </td>
                </tr>
            }
        </tbody>
    </table>
</div>
